package Pro;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;


import javax.swing.JOptionPane;


public class Main extends Frame{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * @param args
	 */
	public Main(){
		setTitle("Windows Main...");
		setBackground(Color.WHITE);
		setLayout(new BorderLayout());
		add(new Panel(),BorderLayout.CENTER);
		setSize(500,300);
		setResizable(false);
		setVisible(true);
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		m.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent arg0) {
				// TODO Auto-generated method stub
				System.exit(0);
			}
			
			@Override
			public void windowClosed(WindowEvent arg0) {
				// TODO Auto-generated method stub
				JOptionPane.showMessageDialog(null, "kak2");
			}
		});
	}

}
